<template>
	<div>
	  <h1>西瓜播放器XgPlayer演示</h1>
	  <hr />
	  <div class="videoPlayer">
		<xg-player :url="videoUrl" @triggerEvent="triggerEvent" ></xg-player>
	  </div>
	</div>
  </template>
  <script>

  import XgPlayer from '@/components/XgPlayer';
  export default {
	directives: {},
	// 注册组件
	components: {
	  XgPlayer,
	},
	data() {
	  return {
		videoUrl: ``,
	  };
	},
	methods: {
	  // 监听到子组件传过来的播放状态 true是播放 false是暂停
	  triggerEvent(value){
		console.log("是否播放：",value);
	  },
	},
  };
  </script>
  <style lang="scss" scoped>
  .videoPlayer {
	height: 300px;
	width: 500px;
	margin: 0 auto;
  }
  </style>
